package org.example.jdk21demo.model;

import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;

/**
 * 示例Person类，用于Javassist测试
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Person {
    private String name;
    private int age;
    private String email;
    
    public void sayHello() {
        System.out.println("Hello, I'm " + name + " and I'm " + age + " years old.");
    }
    
    public void introduce() {
        System.out.println("My name is " + name + ", age: " + age + ", email: " + email);
    }
    
    public String getInfo() {
        return "Person{name='" + name + "', age=" + age + ", email='" + email + "'}";
    }
    
    public void updateAge(int newAge) {
        this.age = newAge;
    }
}